package s08.ch10.homework;

import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;

public class CarFactory {
	public static Promotionable[] parse() throws ParseException {

		SimpleDateFormat data1 = new SimpleDateFormat("yyyy");
		return new Promotionable[] { new Truck("red", new BigDecimal(4000), 1999),
				new Suv("blue", new BigDecimal(900), data1.parse("2002")),
				new Sedan("black", new BigDecimal(500), 3) };
	}
}
